#include<iostream>
#include<stack>
using namespace std;
int a[10],op[10]={0,1,2,3,4};//1,2,3,4分别表示+,-,*,/
const int n=5;
int sum;
void print()
{
    for(int i=1;i<=n-1;i++)
    {
        cout<<a[i];
        switch (op[i])
        {
            case 1:
                cout<<"+";
                break;
            case 2:
                cout<<"-";
                break;
            case 3:
                cout<<"*";
                break;
            case 4:
                cout<<"/";
                break;
            default:
                break;
        }
    }
    cout<<a[n]<<endl;
}
int cal()
{
    stack<int> st;
    int topval;
    st.push(a[1]);
    for(int i=1;i<=n-1;i++)
    {
        switch(op[i])
        {
            case 1:
                st.push(a[i+1]);
                break;
            case 2:
                st.push(-1*a[i+1]);
                break;
            case 3:
                topval=st.top();
                st.pop();
                st.push(topval*a[i+1]);
                break;
            case 4:
                topval=st.top();
                st.pop();
                st.push(topval/a[i+1]);
                break;
            default:
                break;
        }
    }
    int sum=0;
    while(!st.empty())
    {
        sum+=st.top();
        st.pop();
    }
    return sum;
}
void dfs(int now)
{
    if(now==n)
    {
        if(cal()==sum)
        {
            print();
            exit(0);
        }
        return;
    }
    for(int i=now;i<=n;i++)
    {
        swap(a[now],a[i]);
        for(int j=now;j<n;j++)
        {
            swap(op[j],op[now]);
            dfs(now+1);
            swap(op[j],op[now]);
        }
        swap(a[now],a[i]);
    }
}
int main()
{
    cin>>sum;
    for(int i=1;i<=n;i++)
    cin>>a[i];
    dfs(1);
    cout<<"No solution!";
}